package com.ieds.web.controller;

import com.ieds.core.dto.BootTablePage;
import com.ieds.web.service.DatabaseRecordService;
import com.ieds.web.utils.JsonUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: wanglei
 * @Date: 2020.05.29
 * @Description: com.ieds.web.controller
 */
@RestController
@RequestMapping("/database/record")
public class DatabaseRecordController {

    @Autowired
    private DatabaseRecordService databaseRecordService;

    @RequestMapping("getList.shtml")
    public String getList(String startTime, String finishTime, Integer offset, Integer limit, Integer databaseId){
        BootTablePage list = databaseRecordService.getList(offset, limit, databaseId,startTime,finishTime);
        return JsonUtils.objectToJson(list);
    }
}
